﻿@{
    <link href="~/css/table.css" rel="stylesheet" />
    <script src="~/javascript/calendar/cal.js"></script>
    <script src="~/javascript/comm/comm.js"></script>
    <script src="~/javascript/comm/list.js"></script>
    <script src="~/javascript/calendar-ch.js"></script>
    <script src="~/javascript/comm/time.js"></script>
    <script src="~/js/jquery-1.11.1(1).js"></script>
    <script src="~/js/vue.js"></script>
}
<body>
    <div id="app">
        <form method="post">
            <table width="100%">
                <tr>
                    <td>
                        <font color="black">您正在做的业务是：人力资源--调动管理--调动查询 </font>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <input type="button" v-on:click="Select()" value="查询" class="BUTTON_STYLE1" />

                    </td>
                </tr>
            </table>
            <table width="100%" border="1" cellpadding=0 cellspacing=1
                   bordercolorlight=#848284 bordercolordark=#eeeeee
                   class="TABLE_STYLE1">
                <tr class="TR_STYLE1">
                    <td width="16%" class="TD_STYLE1">
                        请选择员工所在I级机构
                    </td>
                    <td width="84%" class="TD_STYLE2">
                        <input hidden="hidden" id="first_kind_name" name="first_kind_name" />
                        <select name="first_kind_id" id="first_kind_id" size="5" class="SELECT_STYLE2" v-on:click="GetoneId()">
                            <option value="0">全部</option>
                            <option v-for="(item,index) in one" :value="item.first_kind_id">{{item.first_kind_name}}</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="TD_STYLE1">
                        请选择员工所在II级机构
                    </td>
                    <td width="84%" class="TD_STYLE2">
                        <input hidden="hidden" id="second_kind_name" name="second_kind_name" />
                        <select name="second_kind_id" id="second_kind_id" size="5" class="SELECT_STYLE2" v-on:click="GettwoId()">
                            <option value="0">全部</option>
                            <option v-for="(item,index) in two" :value="item.second_kind_id">{{item.second_kind_name}}</option>
                        </select>
                    </td>
                </tr>
                <tr class="TR_STYLE1">
                    <td width="16%" class="TD_STYLE1">
                        请选择员工所在III级机构
                    </td>
                    <td width="84%" class="TD_STYLE2">
                        <input hidden="hidden" id="third_kind_name" name="third_kind_name" />
                        <select name="third_kind_id" id="third_kind_id" size="5" class="SELECT_STYLE2" v-on:click="GetthreeId()">
                            <option value="0">全部</option>
                            <option v-for="(item,index) in third" :value="item.third_kind_id">{{item.third_kind_name}}</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="TD_STYLE1">
                        请选择职位分类
                    </td>
                    <td width="84%" class="TD_STYLE2">
                        <input hidden="hidden" id="major_kind_name" name="major_kind_name" />
                        <select name="major_kind_id" size="5" id="major_kind_id"
                                class="SELECT_STYLE2" v-on:click="GetZwfl()">
                            <option value="0" selected="selected">全部</option>
                            <option v-for="(item,index) in zwfl" :value="item.major_kind_id">{{item.major_kind_name}}</option>
                        </select>
                    </td>
                </tr>
                <tr class="TR_STYLE1">
                    <td width="16%" class="TD_STYLE1">
                        请选择职位名称
                    </td>
                    <td width="84%" class="TD_STYLE2">
                        <input hidden="hidden" id="major_name" name="major_name" />
                        <select name="major_id" v-on:click="GetZwmc()" size="5" class="SELECT_STYLE2" id="major_id">
                            <option value="0" selected="selected">全部</option>
                            <option v-for="(item,index) in zwmc" :value="item.major_id">{{item.major_name}}</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="TD_STYLE1">
                        请输入建档时间
                    </td>
                    <td width="84%" class="TD_STYLE2">
                        <input name="utilbean.startDate" onclick="aa('utilbean.startDate')" type="text" class="INPUT_STYLE2" id="start" style="width:24% " value="" size="30">
                        至<input type="text" name="utilbean.endDate" onclick="aa('utilbean.endDate')" value="" style="width:24% " class="INPUT_STYLE2" id="end">
                        （YYYY-MM-DD）
                    </td>
                </tr>
            </table>
        </form>
    </div>
</body>
<script type="text/javascript">
      var vm = new Vue({
        el: "#app",
        data: {
    one: [],//一级
    two: [],//二级
    third: [],//三级
    zwfl: [],         //职位分类
       zwmc: [],//职位名称   
        },
        methods: {        
            GetoneId: function () {
                var t = this;
                $.ajax({
                    url: "/diaodongguanli/one",
                    type: "Post",
                    success: function (msg) {
                        var dts = eval(msg);
                        t.one = dts;
                    }
                })
            },
            GettwoId: function () {
                var t = this;
                var first_kind_id = $("#first_kind_id").val();
                $.ajax({
                    url: "/diaodongguanli/two?t=" + first_kind_id,
                    type: "Post",
                    success: function (msg) {
                        var dts = eval("(" + msg + ")");
                        t.two = dts;
                    }
                })
            }, GetthreeId: function () {
                var t = this;
                var second_kind_id = $("#second_kind_id").val();
                $.ajax({
                    url: "/diaodongguanli/three?t=" + second_kind_id,
                    type: "Post",
                    success: function (msg) {
                        var dts = eval("(" + msg + ")");
                        t.third = dts;
                    }
                })
            }, GetZwfl: function () {
                var t = this;
                $.ajax({
                    url: "/diaodongguanli/GetZwfl",
                    type: "Post",
                    success: function (msg) {
                        var dts = eval(msg);
                        t.zwfl = dts;

                    }
                })
            }, GetZwmc: function () {
                var t = this;
                var major_kind_id = $("#major_kind_id").val();
                $.ajax({
                    url: "/diaodongguanli/GetZwmc?z=" + major_kind_id,
                    type: "Post",
                    success: function (msg) {
                        var dts = eval("(" + msg + ")");
                        t.zwmc = dts;
                    }
                })
            }, Select: function () {
                var first_kind_id = $("#first_kind_id").val();
                var second_kind_id = $("#second_kind_id").val();
                var third_kind_id = $("#third_kind_id").val();
                var major_kind_id = $("#major_kind_id").val();
                var major_id = $("#major_id").val();
                var start = $("#start").val();
                var end = $("#end").val();
                if (first_kind_id == null || first_kind_id == "" || second_kind_id == null || second_kind_id == "" || third_kind_id == "" || third_kind_id == null || major_kind_id == "" || major_kind_id == null || major_id == "" || major_id==null || start == null || start == "" || end == null || end == "") {
                    return false;
                } else {
                    location.href = "/diaodongguanli/list?one=" + first_kind_id + "&two=" + second_kind_id + "&three=" + third_kind_id + "&zwfl=" + major_kind_id + "&zwmc=" + major_id + "&start=" + start + "&end=" + end;
                }

            }
            }
       
    })
</script>
